#include "VulkanMath.h"



vk::Rect2D CVulkanMath::ToVulkanRect2D(const SRect & Rect)
{
    vk::Rect2D VulkanRect;
    VulkanRect.offset.x = Rect.Min.X;
    VulkanRect.offset.y = Rect.Min.Y;
    VulkanRect.extent.width = Rect.Extent.X;
    VulkanRect.extent.height = Rect.Extent.Y;
    return VulkanRect;
}

int64_t CVulkanMath::CalculateBatchNum(int64_t InTotalNum, int64_t InBatchSize)
{
    assert(InBatchSize > 0);
    assert(InTotalNum >= 0);

    int64_t BatchNum = InTotalNum / InBatchSize;
    if (InTotalNum % InBatchSize > 0)
    {
        BatchNum++;
    }
    return BatchNum;
}
